
#include <chrono>
#include <future>
#include <glog/logging.h>
#include <thread>

int find_the_answer()
{
    std::this_thread::sleep_for(std::chrono::milliseconds(100));
    return 10;
}

int main(int argc, char* argv[])
{
    google::SetStderrLogging(google::LogSeverity(FLAGS_minloglevel));
    google::InitGoogleLogging(argv[0]);

    auto the_answer = std::async(find_the_answer);
    LOG(INFO) << "main thread id: " << std::this_thread::get_id();
    LOG(INFO) << "The answer is: " << the_answer.get();
}